#include "FpPushButton.h"


const QString style1 = "QPushButton {"
"background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B6FF00, stop:1 #4FBA00);"
"border-style: outset;"
"border-width: 2px;"
"border-radius: 10px;"
"border-color: beige;"
"font: bold 14px;"
"min-width: 10em;"
"padding: 6px;"
"}"
"QPushButton:hover {"
"background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFF00, stop:1 #FFD700);"
"}"
"QPushButton:pressed {"
"background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFD700, stop:1 #FFFF00);"
"}";

const QString style2 = "QPushButton{"
"border-style:outset;"
"border:1px outset rgb(0,150,255);"
"border_radius:5px;"
"min-width:4em;"
"padding:6px;"
"}"
"QPushButton:hover{"
"background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgb(170,255,255),stop:1 rgb(0,240,240));"
"}"
"QPushButton:pressed{"
"border-style:inset;"
"background-color:qlineargradient(x1:0,y1:0,x2:0,y2:1,stop:0 rgb(0,240,240),stop:1 rgb(170,255,255));"
"}"
;


const QVector<QString> styVec{ style1,style2 };

FpPushButton::FpPushButton(QWidget *parent)
	: QPushButton(parent)
{}

FpPushButton::~FpPushButton()
{}

void FpPushButton::ShowFpStyle(int index)
{
	if (index>=styVec.size())
	{
		return;
	}
	this->setStyleSheet(styVec[index]);
}
